#include "UdpServer.hpp"
#include <iostream>
#include <memory>

using namespace std;

void Useag(char* argv)
{
    cout<<"you should input like this:"<<argv<<" xxxx(port)"<<endl;
}

std::string handler(std::string handler)
{
    return {};
}

int main(int argc,char* argv[])
{
    if(argc!=2)
    {
        Useag(argv[0]);
        exit(0);
    }

    uint16_t port=std::stoi(argv[1]);

    std::unique_ptr<udpserver> udp(new udpserver(port));

    udp->init();
    udp->run(handler);

    return 0;
}